.class public Lcom/sponsorpay/sdk/android/publisher/SponsorPayPublisher;
.super Ljava/lang/Object;
.source "SponsorPayPublisher.java"


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lcom/sponsorpay/sdk/android/publisher/SponsorPayPublisher$UIStringIdentifier;
    }
.end annotation


# static fields
.field public static final DEFAULT_OFFERWALL_REQUEST_CODE:I = 0xff

.field public static final DEFAULT_UNLOCK_OFFERWALL_REQUEST_CODE:I = 0xfe

.field public static final PREFERENCES_FILENAME:Ljava/lang/String; = "SponsorPayPublisherState"

.field private static sUIStrings:Ljava/util/EnumMap;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/EnumMap",
            "<",
            "Lcom/sponsorpay/sdk/android/publisher/SponsorPayPublisher$UIStringIdentifier;",
            "Ljava/lang/String;",
            ">;"
        }
    .end annotation
.end field


# direct methods
.method public constructor <init>()V
    .locals 0

    .prologue
    .line 34
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method

.method public static convertDevicePixelsIntoPixelsMeasurement(FLandroid/content/Context;)I
    .locals 4
    .parameter "dps"
    .parameter "context"

    .prologue
    .line 201
    invoke-virtual {p1}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v2

    invoke-virtual {v2}, Landroid/content/res/Resources;->getDisplayMetrics()Landroid/util/DisplayMetrics;

    move-result-object v2

    iget v1, v2, Landroid/util/DisplayMetrics;->density:F

    .line 202
    .local v1, scale:F
    mul-float v2, p0, v1

    const/high16 v3, 0x3f00

    add-float/2addr v2, v3

    float-to-int v0, v2

    .line 203
    .local v0, pixels:I
    return v0
.end method

.method public static displayNotificationForSuccessfullCoinRequest(Z)V
    .locals 0
    .parameter "shouldShowNotification"

    .prologue
    .line 479
    invoke-static {p0}, Lcom/sponsorpay/sdk/android/publisher/currency/VirtualCurrencyConnector;->shouldShowToastNotification(Z)V

    .line 480
    return-void
.end method

.method public static getIntentForMBEActivity(Landroid/app/Activity;Lcom/sponsorpay/sdk/android/publisher/mbe/SPBrandEngageRequestListener;)Z
    .locals 2
    .parameter "activity"
    .parameter "listener"

    .prologue
    .line 500
    invoke-static {}, Lcom/sponsorpay/sdk/android/SponsorPay;->getCurrentCredentials()Lcom/sponsorpay/sdk/android/credentials/SPCredentials;

    move-result-object v1

    invoke-virtual {v1}, Lcom/sponsorpay/sdk/android/credentials/SPCredentials;->getCredentialsToken()Ljava/lang/String;

    move-result-object v0

    .line 501
    .local v0, credentialsToken:Ljava/lang/String;
    invoke-static {v0, p0, p1}, Lcom/sponsorpay/sdk/android/publisher/SponsorPayPublisher;->getIntentForMBEActivity(Ljava/lang/String;Landroid/app/Activity;Lcom/sponsorpay/sdk/android/publisher/mbe/SPBrandEngageRequestListener;)Z

    move-result v1

    return v1
.end method

.method public static getIntentForMBEActivity(Landroid/app/Activity;Lcom/sponsorpay/sdk/android/publisher/mbe/SPBrandEngageRequestListener;Lcom/sponsorpay/sdk/android/publisher/currency/SPCurrencyServerListener;)Z
    .locals 6
    .parameter "activity"
    .parameter "listener"
    .parameter "vcsListener"

    .prologue
    const/4 v3, 0x0

    .line 521
    invoke-static {}, Lcom/sponsorpay/sdk/android/SponsorPay;->getCurrentCredentials()Lcom/sponsorpay/sdk/android/credentials/SPCredentials;

    move-result-object v1

    invoke-virtual {v1}, Lcom/sponsorpay/sdk/android/credentials/SPCredentials;->getCredentialsToken()Ljava/lang/String;

    move-result-object v0

    .local v0, credentialsToken:Ljava/lang/String;
    move-object v1, p0

    move-object v2, p1

    move-object v4, v3

    move-object v5, p2

    .line 522
    invoke-static/range {v0 .. v5}, Lcom/sponsorpay/sdk/android/publisher/SponsorPayPublisher;->getIntentForMBEActivity(Ljava/lang/String;Landroid/app/Activity;Lcom/sponsorpay/sdk/android/publisher/mbe/SPBrandEngageRequestListener;Ljava/lang/String;Ljava/util/Map;Lcom/sponsorpay/sdk/android/publisher/currency/SPCurrencyServerListener;)Z

    move-result v1

    return v1
.end method

.method public static getIntentForMBEActivity(Ljava/lang/String;Landroid/app/Activity;Lcom/sponsorpay/sdk/android/publisher/mbe/SPBrandEngageRequestListener;)Z
    .locals 6
    .parameter "credentialsToken"
    .parameter "activity"
    .parameter "listener"

    .prologue
    const/4 v3, 0x0

    .line 541
    move-object v0, p0

    move-object v1, p1

    move-object v2, p2

    move-object v4, v3

    move-object v5, v3

    invoke-static/range {v0 .. v5}, Lcom/sponsorpay/sdk/android/publisher/SponsorPayPublisher;->getIntentForMBEActivity(Ljava/lang/String;Landroid/app/Activity;Lcom/sponsorpay/sdk/android/publisher/mbe/SPBrandEngageRequestListener;Ljava/lang/String;Ljava/util/Map;Lcom/sponsorpay/sdk/android/publisher/currency/SPCurrencyServerListener;)Z

    move-result v0

    return v0
.end method

.method public static getIntentForMBEActivity(Ljava/lang/String;Landroid/app/Activity;Lcom/sponsorpay/sdk/android/publisher/mbe/SPBrandEngageRequestListener;Ljava/lang/String;Ljava/util/Map;Lcom/sponsorpay/sdk/android/publisher/currency/SPCurrencyServerListener;)Z
    .locals 4
    .parameter "credentialsToken"
    .parameter "activity"
    .parameter "listener"
    .parameter "currencyName"
    .parameter
    .parameter "vcsListener"
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/lang/String;",
            "Landroid/app/Activity;",
            "Lcom/sponsorpay/sdk/android/publisher/mbe/SPBrandEngageRequestListener;",
            "Ljava/lang/String;",
            "Ljava/util/Map",
            "<",
            "Ljava/lang/String;",
            "Ljava/lang/String;",
            ">;",
            "Lcom/sponsorpay/sdk/android/publisher/currency/SPCurrencyServerListener;",
            ")Z"
        }
    .end annotation

    .prologue
    .line 569
    .local p4, parameters:Ljava/util/Map;,"Ljava/util/Map<Ljava/lang/String;Ljava/lang/String;>;"
    sget-object v0, Lcom/sponsorpay/sdk/android/publisher/mbe/SPBrandEngageClient;->INSTANCE:Lcom/sponsorpay/sdk/android/publisher/mbe/SPBrandEngageClient;

    .line 570
    .local v0, brandEngageClient:Lcom/sponsorpay/sdk/android/publisher/mbe/SPBrandEngageClient;
    invoke-virtual {v0}, Lcom/sponsorpay/sdk/android/publisher/mbe/SPBrandEngageClient;->canRequestOffers()Z

    move-result v1

    .line 571
    .local v1, canRequestOffers:Z
    if-eqz v1, :cond_0

    .line 573
    invoke-static {p0}, Lcom/sponsorpay/sdk/android/SponsorPay;->getCredentials(Ljava/lang/String;)Lcom/sponsorpay/sdk/android/credentials/SPCredentials;

    move-result-object v2

    .line 575
    .local v2, credentials:Lcom/sponsorpay/sdk/android/credentials/SPCredentials;
    invoke-virtual {v0, p3}, Lcom/sponsorpay/sdk/android/publisher/mbe/SPBrandEngageClient;->setCurrencyName(Ljava/lang/String;)Z

    .line 577
    invoke-virtual {v0, p4}, Lcom/sponsorpay/sdk/android/publisher/mbe/SPBrandEngageClient;->setCustomParameters(Ljava/util/Map;)Z

    .line 578
    invoke-virtual {v0, p5}, Lcom/sponsorpay/sdk/android/publisher/mbe/SPBrandEngageClient;->setCurrencyListener(Lcom/sponsorpay/sdk/android/publisher/currency/SPCurrencyServerListener;)Z

    .line 580
    new-instance v3, Lcom/sponsorpay/sdk/android/publisher/mbe/SPBrandEngageRequest;

    invoke-direct {v3, v2, p1, v0, p2}, Lcom/sponsorpay/sdk/android/publisher/mbe/SPBrandEngageRequest;-><init>(Lcom/sponsorpay/sdk/android/credentials/SPCredentials;Landroid/app/Activity;Lcom/sponsorpay/sdk/android/publisher/mbe/SPBrandEngageClient;Lcom/sponsorpay/sdk/android/publisher/mbe/SPBrandEngageRequestListener;)V

    .line 582
    .local v3, request:Lcom/sponsorpay/sdk/android/publisher/mbe/SPBrandEngageRequest;
    invoke-virtual {v3}, Lcom/sponsorpay/sdk/android/publisher/mbe/SPBrandEngageRequest;->askForOffers()V

    .line 584
    .end local v2           #credentials:Lcom/sponsorpay/sdk/android/credentials/SPCredentials;
    .end local v3           #request:Lcom/sponsorpay/sdk/android/publisher/mbe/SPBrandEngageRequest;
    :cond_0
    return v1
.end method

.method public static getIntentForOfferWallActivity(Landroid/content/Context;Ljava/lang/Boolean;)Landroid/content/Intent;
    .locals 3
    .parameter "context"
    .parameter "shouldStayOpen"

    .prologue
    const/4 v2, 0x0

    .line 231
    invoke-static {}, Lcom/sponsorpay/sdk/android/SponsorPay;->getCurrentCredentials()Lcom/sponsorpay/sdk/android/credentials/SPCredentials;

    move-result-object v1

    invoke-virtual {v1}, Lcom/sponsorpay/sdk/android/credentials/SPCredentials;->getCredentialsToken()Ljava/lang/String;

    move-result-object v0

    .line 232
    .local v0, credentialsToken:Ljava/lang/String;
    invoke-static {v0, p0, p1, v2, v2}, Lcom/sponsorpay/sdk/android/publisher/SponsorPayPublisher;->getIntentForOfferWallActivity(Ljava/lang/String;Landroid/content/Context;Ljava/lang/Boolean;Ljava/lang/String;Ljava/util/HashMap;)Landroid/content/Intent;

    move-result-object v1

    return-object v1
.end method

.method public static getIntentForOfferWallActivity(Landroid/content/Context;Ljava/lang/Boolean;Ljava/lang/String;Ljava/util/HashMap;)Landroid/content/Intent;
    .locals 2
    .parameter "context"
    .parameter "shouldStayOpen"
    .parameter "currencyName"
    .parameter
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Landroid/content/Context;",
            "Ljava/lang/Boolean;",
            "Ljava/lang/String;",
            "Ljava/util/HashMap",
            "<",
            "Ljava/lang/String;",
            "Ljava/lang/String;",
            ">;)",
            "Landroid/content/Intent;"
        }
    .end annotation

    .prologue
    .line 262
    .local p3, customParams:Ljava/util/HashMap;,"Ljava/util/HashMap<Ljava/lang/String;Ljava/lang/String;>;"
    invoke-static {}, Lcom/sponsorpay/sdk/android/SponsorPay;->getCurrentCredentials()Lcom/sponsorpay/sdk/android/credentials/SPCredentials;

    move-result-object v1

    invoke-virtual {v1}, Lcom/sponsorpay/sdk/android/credentials/SPCredentials;->getCredentialsToken()Ljava/lang/String;

    move-result-object v0

    .line 263
    .local v0, credentialsToken:Ljava/lang/String;
    invoke-static {v0, p0, p1, p2, p3}, Lcom/sponsorpay/sdk/android/publisher/SponsorPayPublisher;->getIntentForOfferWallActivity(Ljava/lang/String;Landroid/content/Context;Ljava/lang/Boolean;Ljava/lang/String;Ljava/util/HashMap;)Landroid/content/Intent;

    move-result-object v1

    return-object v1
.end method

.method public static getIntentForOfferWallActivity(Ljava/lang/String;Landroid/content/Context;Ljava/lang/Boolean;Ljava/lang/String;Ljava/util/HashMap;)Landroid/content/Intent;
    .locals 4
    .parameter "credentialsToken"
    .parameter "context"
    .parameter "shouldStayOpen"
    .parameter "currencyName"
    .parameter
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/lang/String;",
            "Landroid/content/Context;",
            "Ljava/lang/Boolean;",
            "Ljava/lang/String;",
            "Ljava/util/HashMap",
            "<",
            "Ljava/lang/String;",
            "Ljava/lang/String;",
            ">;)",
            "Landroid/content/Intent;"
        }
    .end annotation

    .prologue
    .line 297
    .local p4, customParams:Ljava/util/HashMap;,"Ljava/util/HashMap<Ljava/lang/String;Ljava/lang/String;>;"
    invoke-static {p0}, Lcom/sponsorpay/sdk/android/SponsorPay;->getCredentials(Ljava/lang/String;)Lcom/sponsorpay/sdk/android/credentials/SPCredentials;

    move-result-object v0

    .line 300
    .local v0, credentials:Lcom/sponsorpay/sdk/android/credentials/SPCredentials;
    new-instance v1, Landroid/content/Intent;

    const-class v2, Lcom/sponsorpay/sdk/android/publisher/OfferWallActivity;

    invoke-direct {v1, p1, v2}, Landroid/content/Intent;-><init>(Landroid/content/Context;Ljava/lang/Class;)V

    .line 301
    .local v1, intent:Landroid/content/Intent;
    const-string v2, "EXTRA_CREDENTIALS_TOKEN_KEY"

    invoke-virtual {v0}, Lcom/sponsorpay/sdk/android/credentials/SPCredentials;->getCredentialsToken()Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v1, v2, v3}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;

    .line 303
    if-eqz p2, :cond_0

    .line 304
    const-string v2, "EXTRA_SHOULD_REMAIN_OPEN_KEY"

    invoke-virtual {v1, v2, p2}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/io/Serializable;)Landroid/content/Intent;

    .line 307
    :cond_0
    invoke-static {p3}, Lcom/sponsorpay/sdk/android/utils/StringUtils;->notNullNorEmpty(Ljava/lang/String;)Z

    move-result v2

    if-eqz v2, :cond_1

    .line 308
    const-string v2, "EXTRA_CURRENCY_NAME_KEY"

    invoke-virtual {v1, v2, p3}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;

    .line 311
    :cond_1
    const-string v2, "EXTRA_KEY_VALUES_MAP"

    invoke-virtual {v1, v2, p4}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/io/Serializable;)Landroid/content/Intent;

    .line 314
    return-object v1
.end method

.method public static getIntentForUnlockOfferWallActivity(Landroid/content/Context;Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;
    .locals 2
    .parameter "context"
    .parameter "unlockItemId"
    .parameter "unlockItemName"

    .prologue
    .line 344
    invoke-static {}, Lcom/sponsorpay/sdk/android/SponsorPay;->getCurrentCredentials()Lcom/sponsorpay/sdk/android/credentials/SPCredentials;

    move-result-object v1

    invoke-virtual {v1}, Lcom/sponsorpay/sdk/android/credentials/SPCredentials;->getCredentialsToken()Ljava/lang/String;

    move-result-object v0

    .line 346
    .local v0, credentialsToken:Ljava/lang/String;
    const/4 v1, 0x0

    .line 345
    invoke-static {v0, p0, p1, p2, v1}, Lcom/sponsorpay/sdk/android/publisher/SponsorPayPublisher;->getIntentForUnlockOfferWallActivity(Ljava/lang/String;Landroid/content/Context;Ljava/lang/String;Ljava/lang/String;Ljava/util/HashMap;)Landroid/content/Intent;

    move-result-object v1

    return-object v1
.end method

.method public static getIntentForUnlockOfferWallActivity(Ljava/lang/String;Landroid/content/Context;Ljava/lang/String;Ljava/lang/String;Ljava/util/HashMap;)Landroid/content/Intent;
    .locals 6
    .parameter "credentialsToken"
    .parameter "context"
    .parameter "unlockItemId"
    .parameter "unlockItemName"
    .parameter
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/lang/String;",
            "Landroid/content/Context;",
            "Ljava/lang/String;",
            "Ljava/lang/String;",
            "Ljava/util/HashMap",
            "<",
            "Ljava/lang/String;",
            "Ljava/lang/String;",
            ">;)",
            "Landroid/content/Intent;"
        }
    .end annotation

    .prologue
    .line 374
    .local p4, customParams:Ljava/util/HashMap;,"Ljava/util/HashMap<Ljava/lang/String;Ljava/lang/String;>;"
    :try_start_0
    invoke-static {p2}, Lcom/sponsorpay/sdk/android/utils/SPIdValidator;->validate(Ljava/lang/String;)V
    :try_end_0
    .catch Lcom/sponsorpay/sdk/android/utils/SPIdException; {:try_start_0 .. :try_end_0} :catch_0

    .line 379
    invoke-static {p0}, Lcom/sponsorpay/sdk/android/SponsorPay;->getCredentials(Ljava/lang/String;)Lcom/sponsorpay/sdk/android/credentials/SPCredentials;

    move-result-object v0

    .line 381
    .local v0, credentials:Lcom/sponsorpay/sdk/android/credentials/SPCredentials;
    new-instance v2, Landroid/content/Intent;

    const-class v3, Lcom/sponsorpay/sdk/android/publisher/OfferWallActivity;

    invoke-direct {v2, p1, v3}, Landroid/content/Intent;-><init>(Landroid/content/Context;Ljava/lang/Class;)V

    .line 382
    .local v2, intent:Landroid/content/Intent;
    const-string v3, "EXTRA_CREDENTIALS_TOKEN_KEY"

    invoke-virtual {v0}, Lcom/sponsorpay/sdk/android/credentials/SPCredentials;->getCredentialsToken()Ljava/lang/String;

    move-result-object v4

    invoke-virtual {v2, v3, v4}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;

    .line 384
    const-string v3, "EXTRA_OFFERWALL_TEMPLATE_KEY"

    .line 385
    const-string v4, "OFFERWALL_TYPE_UNLOCK"

    .line 384
    invoke-virtual {v2, v3, v4}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;

    .line 386
    const-string v3, "EXTRA_UNLOCK_ITEM_ID_KEY"

    invoke-virtual {v2, v3, p2}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;

    .line 388
    const-string v3, "EXTRA_UNLOCK_ITEM_NAME_KEY"

    invoke-virtual {v2, v3, p3}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;

    .line 391
    const-string v3, "EXTRA_KEY_VALUES_MAP"

    invoke-virtual {v2, v3, p4}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/io/Serializable;)Landroid/content/Intent;

    .line 393
    return-object v2

    .line 375
    .end local v0           #credentials:Lcom/sponsorpay/sdk/android/credentials/SPCredentials;
    .end local v2           #intent:Landroid/content/Intent;
    :catch_0
    move-exception v1

    .line 376
    .local v1, e:Lcom/sponsorpay/sdk/android/utils/SPIdException;
    new-instance v3, Ljava/lang/RuntimeException;

    new-instance v4, Ljava/lang/StringBuilder;

    const-string v5, "The provided Unlock Item ID is not valid. "

    invoke-direct {v4, v5}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    .line 377
    invoke-virtual {v1}, Lcom/sponsorpay/sdk/android/utils/SPIdException;->getLocalizedMessage()Ljava/lang/String;

    move-result-object v5

    invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v4

    invoke-virtual {v4}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v4

    .line 376
    invoke-direct {v3, v4}, Ljava/lang/RuntimeException;-><init>(Ljava/lang/String;)V

    throw v3
.end method

.method public static getUIString(Lcom/sponsorpay/sdk/android/publisher/SponsorPayPublisher$UIStringIdentifier;)Ljava/lang/String;
    .locals 1
    .parameter "identifier"

    .prologue
    .line 89
    sget-object v0, Lcom/sponsorpay/sdk/android/publisher/SponsorPayPublisher;->sUIStrings:Ljava/util/EnumMap;

    if-nez v0, :cond_0

    .line 90
    invoke-static {}, Lcom/sponsorpay/sdk/android/publisher/SponsorPayPublisher;->initUIStrings()V

    .line 93
    :cond_0
    sget-object v0, Lcom/sponsorpay/sdk/android/publisher/SponsorPayPublisher;->sUIStrings:Ljava/util/EnumMap;

    invoke-virtual {v0, p0}, Ljava/util/EnumMap;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Ljava/lang/String;

    return-object v0
.end method

.method private static initUIStrings()V
    .locals 3

    .prologue
    .line 58
    new-instance v0, Ljava/util/EnumMap;

    const-class v1, Lcom/sponsorpay/sdk/android/publisher/SponsorPayPublisher$UIStringIdentifier;

    invoke-direct {v0, v1}, Ljava/util/EnumMap;-><init>(Ljava/lang/Class;)V

    sput-object v0, Lcom/sponsorpay/sdk/android/publisher/SponsorPayPublisher;->sUIStrings:Ljava/util/EnumMap;

    .line 59
    sget-object v0, Lcom/sponsorpay/sdk/android/publisher/SponsorPayPublisher;->sUIStrings:Ljava/util/EnumMap;

    sget-object v1, Lcom/sponsorpay/sdk/android/publisher/SponsorPayPublisher$UIStringIdentifier;->ERROR_DIALOG_TITLE:Lcom/sponsorpay/sdk/android/publisher/SponsorPayPublisher$UIStringIdentifier;

    const-string v2, "Error"

    invoke-virtual {v0, v1, v2}, Ljava/util/EnumMap;->put(Ljava/lang/Enum;Ljava/lang/Object;)Ljava/lang/Object;

    .line 60
    sget-object v0, Lcom/sponsorpay/sdk/android/publisher/SponsorPayPublisher;->sUIStrings:Ljava/util/EnumMap;

    sget-object v1, Lcom/sponsorpay/sdk/android/publisher/SponsorPayPublisher$UIStringIdentifier;->DISMISS_ERROR_DIALOG:Lcom/sponsorpay/sdk/android/publisher/SponsorPayPublisher$UIStringIdentifier;

    const-string v2, "Dismiss"

    invoke-virtual {v0, v1, v2}, Ljava/util/EnumMap;->put(Ljava/lang/Enum;Ljava/lang/Object;)Ljava/lang/Object;

    .line 61
    sget-object v0, Lcom/sponsorpay/sdk/android/publisher/SponsorPayPublisher;->sUIStrings:Ljava/util/EnumMap;

    sget-object v1, Lcom/sponsorpay/sdk/android/publisher/SponsorPayPublisher$UIStringIdentifier;->GENERIC_ERROR:Lcom/sponsorpay/sdk/android/publisher/SponsorPayPublisher$UIStringIdentifier;

    .line 62
    const-string v2, "An error happened when performing this operation"

    .line 61
    invoke-virtual {v0, v1, v2}, Ljava/util/EnumMap;->put(Ljava/lang/Enum;Ljava/lang/Object;)Ljava/lang/Object;

    .line 63
    sget-object v0, Lcom/sponsorpay/sdk/android/publisher/SponsorPayPublisher;->sUIStrings:Ljava/util/EnumMap;

    sget-object v1, Lcom/sponsorpay/sdk/android/publisher/SponsorPayPublisher$UIStringIdentifier;->ERROR_LOADING_OFFERWALL:Lcom/sponsorpay/sdk/android/publisher/SponsorPayPublisher$UIStringIdentifier;

    .line 64
    const-string v2, "An error happened when loading the offer wall"

    .line 63
    invoke-virtual {v0, v1, v2}, Ljava/util/EnumMap;->put(Ljava/lang/Enum;Ljava/lang/Object;)Ljava/lang/Object;

    .line 65
    sget-object v0, Lcom/sponsorpay/sdk/android/publisher/SponsorPayPublisher;->sUIStrings:Ljava/util/EnumMap;

    sget-object v1, Lcom/sponsorpay/sdk/android/publisher/SponsorPayPublisher$UIStringIdentifier;->ERROR_LOADING_OFFERWALL_NO_INTERNET_CONNECTION:Lcom/sponsorpay/sdk/android/publisher/SponsorPayPublisher$UIStringIdentifier;

    .line 66
    const-string v2, "An error happened when loading the offer wall (no internet connection)"

    .line 65
    invoke-virtual {v0, v1, v2}, Ljava/util/EnumMap;->put(Ljava/lang/Enum;Ljava/lang/Object;)Ljava/lang/Object;

    .line 67
    sget-object v0, Lcom/sponsorpay/sdk/android/publisher/SponsorPayPublisher;->sUIStrings:Ljava/util/EnumMap;

    sget-object v1, Lcom/sponsorpay/sdk/android/publisher/SponsorPayPublisher$UIStringIdentifier;->LOADING_INTERSTITIAL:Lcom/sponsorpay/sdk/android/publisher/SponsorPayPublisher$UIStringIdentifier;

    const-string v2, "Loading..."

    invoke-virtual {v0, v1, v2}, Ljava/util/EnumMap;->put(Ljava/lang/Enum;Ljava/lang/Object;)Ljava/lang/Object;

    .line 68
    sget-object v0, Lcom/sponsorpay/sdk/android/publisher/SponsorPayPublisher;->sUIStrings:Ljava/util/EnumMap;

    sget-object v1, Lcom/sponsorpay/sdk/android/publisher/SponsorPayPublisher$UIStringIdentifier;->LOADING_OFFERWALL:Lcom/sponsorpay/sdk/android/publisher/SponsorPayPublisher$UIStringIdentifier;

    const-string v2, "Loading..."

    invoke-virtual {v0, v1, v2}, Ljava/util/EnumMap;->put(Ljava/lang/Enum;Ljava/lang/Object;)Ljava/lang/Object;

    .line 69
    sget-object v0, Lcom/sponsorpay/sdk/android/publisher/SponsorPayPublisher;->sUIStrings:Ljava/util/EnumMap;

    sget-object v1, Lcom/sponsorpay/sdk/android/publisher/SponsorPayPublisher$UIStringIdentifier;->ERROR_PLAY_STORE_UNAVAILABLE:Lcom/sponsorpay/sdk/android/publisher/SponsorPayPublisher$UIStringIdentifier;

    const-string v2, "You don\'t have the Google Play Store application on your device to complete App Install offers."

    invoke-virtual {v0, v1, v2}, Ljava/util/EnumMap;->put(Ljava/lang/Enum;Ljava/lang/Object;)Ljava/lang/Object;

    .line 70
    sget-object v0, Lcom/sponsorpay/sdk/android/publisher/SponsorPayPublisher;->sUIStrings:Ljava/util/EnumMap;

    sget-object v1, Lcom/sponsorpay/sdk/android/publisher/SponsorPayPublisher$UIStringIdentifier;->MBE_REWARD_NOTIFICATION:Lcom/sponsorpay/sdk/android/publisher/SponsorPayPublisher$UIStringIdentifier;

    const-string v2, "Thanks! Your reward will be paid out shortly"

    invoke-virtual {v0, v1, v2}, Ljava/util/EnumMap;->put(Ljava/lang/Enum;Ljava/lang/Object;)Ljava/lang/Object;

    .line 71
    sget-object v0, Lcom/sponsorpay/sdk/android/publisher/SponsorPayPublisher;->sUIStrings:Ljava/util/EnumMap;

    sget-object v1, Lcom/sponsorpay/sdk/android/publisher/SponsorPayPublisher$UIStringIdentifier;->VCS_COINS_NOTIFICATION:Lcom/sponsorpay/sdk/android/publisher/SponsorPayPublisher$UIStringIdentifier;

    const-string v2, "Congratulations! You\'ve earned %.0f %s!"

    invoke-virtual {v0, v1, v2}, Ljava/util/EnumMap;->put(Ljava/lang/Enum;Ljava/lang/Object;)Ljava/lang/Object;

    .line 72
    sget-object v0, Lcom/sponsorpay/sdk/android/publisher/SponsorPayPublisher;->sUIStrings:Ljava/util/EnumMap;

    sget-object v1, Lcom/sponsorpay/sdk/android/publisher/SponsorPayPublisher$UIStringIdentifier;->VCS_DEFAULT_CURRENCY:Lcom/sponsorpay/sdk/android/publisher/SponsorPayPublisher$UIStringIdentifier;

    const-string v2, "coins"

    invoke-virtual {v0, v1, v2}, Ljava/util/EnumMap;->put(Ljava/lang/Enum;Ljava/lang/Object;)Ljava/lang/Object;

    .line 74
    sget-object v0, Lcom/sponsorpay/sdk/android/publisher/SponsorPayPublisher;->sUIStrings:Ljava/util/EnumMap;

    sget-object v1, Lcom/sponsorpay/sdk/android/publisher/SponsorPayPublisher$UIStringIdentifier;->MBE_ERROR_DIALOG_TITLE:Lcom/sponsorpay/sdk/android/publisher/SponsorPayPublisher$UIStringIdentifier;

    const-string v2, "Error"

    invoke-virtual {v0, v1, v2}, Ljava/util/EnumMap;->put(Ljava/lang/Enum;Ljava/lang/Object;)Ljava/lang/Object;

    .line 75
    sget-object v0, Lcom/sponsorpay/sdk/android/publisher/SponsorPayPublisher;->sUIStrings:Ljava/util/EnumMap;

    sget-object v1, Lcom/sponsorpay/sdk/android/publisher/SponsorPayPublisher$UIStringIdentifier;->MBE_ERROR_DIALOG_MESSAGE_DEFAULT:Lcom/sponsorpay/sdk/android/publisher/SponsorPayPublisher$UIStringIdentifier;

    const-string v2, "We\'re sorry, something went wrong. Please try again."

    invoke-virtual {v0, v1, v2}, Ljava/util/EnumMap;->put(Ljava/lang/Enum;Ljava/lang/Object;)Ljava/lang/Object;

    .line 76
    sget-object v0, Lcom/sponsorpay/sdk/android/publisher/SponsorPayPublisher;->sUIStrings:Ljava/util/EnumMap;

    sget-object v1, Lcom/sponsorpay/sdk/android/publisher/SponsorPayPublisher$UIStringIdentifier;->MBE_ERROR_DIALOG_MESSAGE_OFFLINE:Lcom/sponsorpay/sdk/android/publisher/SponsorPayPublisher$UIStringIdentifier;

    const-string v2, "Your Internet connection has been lost. Please try again later."

    invoke-virtual {v0, v1, v2}, Ljava/util/EnumMap;->put(Ljava/lang/Enum;Ljava/lang/Object;)Ljava/lang/Object;

    .line 77
    sget-object v0, Lcom/sponsorpay/sdk/android/publisher/SponsorPayPublisher;->sUIStrings:Ljava/util/EnumMap;

    sget-object v1, Lcom/sponsorpay/sdk/android/publisher/SponsorPayPublisher$UIStringIdentifier;->MBE_ERROR_DIALOG_BUTTON_TITLE_DISMISS:Lcom/sponsorpay/sdk/android/publisher/SponsorPayPublisher$UIStringIdentifier;

    const-string v2, "Dismiss"

    invoke-virtual {v0, v1, v2}, Ljava/util/EnumMap;->put(Ljava/lang/Enum;Ljava/lang/Object;)Ljava/lang/Object;

    .line 78
    sget-object v0, Lcom/sponsorpay/sdk/android/publisher/SponsorPayPublisher;->sUIStrings:Ljava/util/EnumMap;

    sget-object v1, Lcom/sponsorpay/sdk/android/publisher/SponsorPayPublisher$UIStringIdentifier;->MBE_FORFEIT_DIALOG_TITLE:Lcom/sponsorpay/sdk/android/publisher/SponsorPayPublisher$UIStringIdentifier;

    const-string v2, ""

    invoke-virtual {v0, v1, v2}, Ljava/util/EnumMap;->put(Ljava/lang/Enum;Ljava/lang/Object;)Ljava/lang/Object;

    .line 79
    return-void
.end method

.method public static requestNewCoins(Landroid/content/Context;Lcom/sponsorpay/sdk/android/publisher/currency/SPCurrencyServerListener;)V
    .locals 1
    .parameter "context"
    .parameter "listener"

    .prologue
    .line 413
    const/4 v0, 0x0

    invoke-static {p0, p1, v0}, Lcom/sponsorpay/sdk/android/publisher/SponsorPayPublisher;->requestNewCoins(Landroid/content/Context;Lcom/sponsorpay/sdk/android/publisher/currency/SPCurrencyServerListener;Ljava/lang/String;)V

    .line 414
    return-void
.end method

.method public static requestNewCoins(Landroid/content/Context;Lcom/sponsorpay/sdk/android/publisher/currency/SPCurrencyServerListener;Ljava/lang/String;)V
    .locals 6
    .parameter "context"
    .parameter "listener"
    .parameter "customCurrency"

    .prologue
    const/4 v3, 0x0

    .line 433
    invoke-static {}, Lcom/sponsorpay/sdk/android/SponsorPay;->getCurrentCredentials()Lcom/sponsorpay/sdk/android/credentials/SPCredentials;

    move-result-object v1

    invoke-virtual {v1}, Lcom/sponsorpay/sdk/android/credentials/SPCredentials;->getCredentialsToken()Ljava/lang/String;

    move-result-object v0

    .local v0, credentialsToken:Ljava/lang/String;
    move-object v1, p0

    move-object v2, p1

    move-object v4, v3

    move-object v5, p2

    .line 434
    invoke-static/range {v0 .. v5}, Lcom/sponsorpay/sdk/android/publisher/SponsorPayPublisher;->requestNewCoins(Ljava/lang/String;Landroid/content/Context;Lcom/sponsorpay/sdk/android/publisher/currency/SPCurrencyServerListener;Ljava/lang/String;Ljava/util/Map;Ljava/lang/String;)V

    .line 435
    return-void
.end method

.method public static requestNewCoins(Ljava/lang/String;Landroid/content/Context;Lcom/sponsorpay/sdk/android/publisher/currency/SPCurrencyServerListener;Ljava/lang/String;Ljava/util/Map;Ljava/lang/String;)V
    .locals 1
    .parameter "credentialsToken"
    .parameter "context"
    .parameter "listener"
    .parameter "transactionId"
    .parameter
    .parameter "customCurrency"
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/lang/String;",
            "Landroid/content/Context;",
            "Lcom/sponsorpay/sdk/android/publisher/currency/SPCurrencyServerListener;",
            "Ljava/lang/String;",
            "Ljava/util/Map",
            "<",
            "Ljava/lang/String;",
            "Ljava/lang/String;",
            ">;",
            "Ljava/lang/String;",
            ")V"
        }
    .end annotation

    .prologue
    .line 464
    .local p4, customParams:Ljava/util/Map;,"Ljava/util/Map<Ljava/lang/String;Ljava/lang/String;>;"
    new-instance v0, Lcom/sponsorpay/sdk/android/publisher/currency/VirtualCurrencyConnector;

    invoke-direct {v0, p1, p0, p2}, Lcom/sponsorpay/sdk/android/publisher/currency/VirtualCurrencyConnector;-><init>(Landroid/content/Context;Ljava/lang/String;Lcom/sponsorpay/sdk/android/publisher/currency/SPCurrencyServerListener;)V

    .line 465
    .local v0, vcc:Lcom/sponsorpay/sdk/android/publisher/currency/VirtualCurrencyConnector;
    invoke-virtual {v0, p4}, Lcom/sponsorpay/sdk/android/publisher/currency/VirtualCurrencyConnector;->setCustomParameters(Ljava/util/Map;)V

    .line 466
    invoke-virtual {v0, p5}, Lcom/sponsorpay/sdk/android/publisher/currency/VirtualCurrencyConnector;->setCurrency(Ljava/lang/String;)Lcom/sponsorpay/sdk/android/publisher/currency/VirtualCurrencyConnector;

    .line 467
    invoke-virtual {v0, p3}, Lcom/sponsorpay/sdk/android/publisher/currency/VirtualCurrencyConnector;->fetchDeltaOfCoinsForCurrentUserSinceTransactionId(Ljava/lang/String;)V

    .line 468
    return-void
.end method

.method public static setCookiesIntoCookieManagerInstance([Ljava/lang/String;Ljava/lang/String;Landroid/content/Context;)V
    .locals 6
    .parameter "cookies"
    .parameter "baseUrl"
    .parameter "context"

    .prologue
    .line 173
    if-eqz p0, :cond_0

    array-length v3, p0

    if-nez v3, :cond_1

    .line 195
    :cond_0
    return-void

    .line 181
    :cond_1
    :try_start_0
    invoke-static {}, Landroid/webkit/CookieSyncManager;->getInstance()Landroid/webkit/CookieSyncManager;
    :try_end_0
    .catch Ljava/lang/IllegalStateException; {:try_start_0 .. :try_end_0} :catch_0

    .line 186
    :goto_0
    invoke-static {}, Landroid/webkit/CookieManager;->getInstance()Landroid/webkit/CookieManager;

    move-result-object v2

    .line 188
    .local v2, instance:Landroid/webkit/CookieManager;
    sget-object v3, Lcom/sponsorpay/sdk/android/publisher/AsyncRequest;->LOG_TAG:Ljava/lang/String;

    new-instance v4, Ljava/lang/StringBuilder;

    const-string v5, "Setting the following cookies into CookieManager instance "

    invoke-direct {v4, v5}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    .line 189
    invoke-virtual {v4, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;

    move-result-object v4

    const-string v5, " for base URL "

    invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v4

    invoke-virtual {v4, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v4

    const-string v5, ": "

    invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v4

    invoke-virtual {v4}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v4

    .line 188
    invoke-static {v3, v4}, Lcom/sponsorpay/sdk/android/utils/SponsorPayLogger;->v(Ljava/lang/String;Ljava/lang/String;)V

    .line 191
    array-length v4, p0

    const/4 v3, 0x0

    :goto_1
    if-ge v3, v4, :cond_0

    aget-object v0, p0, v3

    .line 192
    .local v0, cookieString:Ljava/lang/String;
    invoke-virtual {v2, p1, v0}, Landroid/webkit/CookieManager;->setCookie(Ljava/lang/String;Ljava/lang/String;)V

    .line 193
    sget-object v5, Lcom/sponsorpay/sdk/android/publisher/AsyncRequest;->LOG_TAG:Ljava/lang/String;

    invoke-static {v5, v0}, Lcom/sponsorpay/sdk/android/utils/SponsorPayLogger;->v(Ljava/lang/String;Ljava/lang/String;)V

    .line 191
    add-int/lit8 v3, v3, 0x1

    goto :goto_1

    .line 182
    .end local v0           #cookieString:Ljava/lang/String;
    .end local v2           #instance:Landroid/webkit/CookieManager;
    :catch_0
    move-exception v1

    .line 183
    .local v1, e:Ljava/lang/IllegalStateException;
    invoke-static {p2}, Landroid/webkit/CookieSyncManager;->createInstance(Landroid/content/Context;)Landroid/webkit/CookieSyncManager;

    goto :goto_0
.end method

.method public static setCustomUIString(Lcom/sponsorpay/sdk/android/publisher/SponsorPayPublisher$UIStringIdentifier;ILandroid/content/Context;)V
    .locals 1
    .parameter "identifier"
    .parameter "message"
    .parameter "context"

    .prologue
    .line 137
    invoke-virtual {p2, p1}, Landroid/content/Context;->getString(I)Ljava/lang/String;

    move-result-object v0

    invoke-static {p0, v0}, Lcom/sponsorpay/sdk/android/publisher/SponsorPayPublisher;->setCustomUIString(Lcom/sponsorpay/sdk/android/publisher/SponsorPayPublisher$UIStringIdentifier;Ljava/lang/String;)V

    .line 138
    return-void
.end method

.method public static setCustomUIString(Lcom/sponsorpay/sdk/android/publisher/SponsorPayPublisher$UIStringIdentifier;Ljava/lang/String;)V
    .locals 1
    .parameter "identifier"
    .parameter "message"

    .prologue
    .line 105
    sget-object v0, Lcom/sponsorpay/sdk/android/publisher/SponsorPayPublisher;->sUIStrings:Ljava/util/EnumMap;

    if-nez v0, :cond_0

    .line 106
    invoke-static {}, Lcom/sponsorpay/sdk/android/publisher/SponsorPayPublisher;->initUIStrings()V

    .line 109
    :cond_0
    sget-object v0, Lcom/sponsorpay/sdk/android/publisher/SponsorPayPublisher;->sUIStrings:Ljava/util/EnumMap;

    invoke-virtual {v0, p0, p1}, Ljava/util/EnumMap;->put(Ljava/lang/Enum;Ljava/lang/Object;)Ljava/lang/Object;

    .line 110
    return-void
.end method

.method public static setCustomUIStrings(Ljava/util/EnumMap;)V
    .locals 5
    .parameter
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/util/EnumMap",
            "<",
            "Lcom/sponsorpay/sdk/android/publisher/SponsorPayPublisher$UIStringIdentifier;",
            "Ljava/lang/String;",
            ">;)V"
        }
    .end annotation

    .prologue
    .line 119
    .local p0, messages:Ljava/util/EnumMap;,"Ljava/util/EnumMap<Lcom/sponsorpay/sdk/android/publisher/SponsorPayPublisher$UIStringIdentifier;Ljava/lang/String;>;"
    invoke-static {}, Lcom/sponsorpay/sdk/android/publisher/SponsorPayPublisher$UIStringIdentifier;->values()[Lcom/sponsorpay/sdk/android/publisher/SponsorPayPublisher$UIStringIdentifier;

    move-result-object v3

    array-length v4, v3

    const/4 v1, 0x0

    move v2, v1

    :goto_0
    if-lt v2, v4, :cond_0

    .line 124
    return-void

    .line 119
    :cond_0
    aget-object v0, v3, v2

    .line 120
    .local v0, condition:Lcom/sponsorpay/sdk/android/publisher/SponsorPayPublisher$UIStringIdentifier;
    invoke-virtual {p0, v0}, Ljava/util/EnumMap;->containsKey(Ljava/lang/Object;)Z

    move-result v1

    if-eqz v1, :cond_1

    .line 121
    invoke-virtual {p0, v0}, Ljava/util/EnumMap;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Ljava/lang/String;

    invoke-static {v0, v1}, Lcom/sponsorpay/sdk/android/publisher/SponsorPayPublisher;->setCustomUIString(Lcom/sponsorpay/sdk/android/publisher/SponsorPayPublisher$UIStringIdentifier;Ljava/lang/String;)V

    .line 119
    :cond_1
    add-int/lit8 v1, v2, 0x1

    move v2, v1

    goto :goto_0
.end method

.method public static setCustomUIStrings(Ljava/util/EnumMap;Landroid/content/Context;)V
    .locals 5
    .parameter
    .parameter "context"
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/util/EnumMap",
            "<",
            "Lcom/sponsorpay/sdk/android/publisher/SponsorPayPublisher$UIStringIdentifier;",
            "Ljava/lang/Integer;",
            ">;",
            "Landroid/content/Context;",
            ")V"
        }
    .end annotation

    .prologue
    .line 142
    .local p0, messages:Ljava/util/EnumMap;,"Ljava/util/EnumMap<Lcom/sponsorpay/sdk/android/publisher/SponsorPayPublisher$UIStringIdentifier;Ljava/lang/Integer;>;"
    invoke-static {}, Lcom/sponsorpay/sdk/android/publisher/SponsorPayPublisher$UIStringIdentifier;->values()[Lcom/sponsorpay/sdk/android/publisher/SponsorPayPublisher$UIStringIdentifier;

    move-result-object v3

    array-length v4, v3

    const/4 v1, 0x0

    move v2, v1

    :goto_0
    if-lt v2, v4, :cond_0

    .line 147
    return-void

    .line 142
    :cond_0
    aget-object v0, v3, v2

    .line 143
    .local v0, condition:Lcom/sponsorpay/sdk/android/publisher/SponsorPayPublisher$UIStringIdentifier;
    invoke-virtual {p0, v0}, Ljava/util/EnumMap;->containsKey(Ljava/lang/Object;)Z

    move-result v1

    if-eqz v1, :cond_1

    .line 144
    invoke-virtual {p0, v0}, Ljava/util/EnumMap;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Ljava/lang/Integer;

    invoke-virtual {v1}, Ljava/lang/Integer;->intValue()I

    move-result v1

    invoke-static {v0, v1, p1}, Lcom/sponsorpay/sdk/android/publisher/SponsorPayPublisher;->setCustomUIString(Lcom/sponsorpay/sdk/android/publisher/SponsorPayPublisher$UIStringIdentifier;ILandroid/content/Context;)V

    .line 142
    :cond_1
    add-int/lit8 v1, v2, 0x1

    move v2, v1

    goto :goto_0
.end method
